package com.wt.springsamples.ext;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class ExtApplication {
    public static void main(String[] args) {

//        BigCat bc = new BigCat();
        ApplicationContext applicationContext = new AnnotationConfigApplicationContext(ExtConfig.class);

//        Animal animal = applicationContext.getBean(Animal.class);
        DefService defService = applicationContext.getBean(DefService.class);
        DefService defService2 = applicationContext.getBean(DefService.class);
        System.out.println(defService.dog==defService2.dog);;
//        String[] beanNames = applicationContext.getBeanDefinitionNames();
//        for (String beanName:beanNames) {
//            System.out.println(beanName);
//
//        }
    }
}
